test: add regression tests for custom shader with framebuffer depth texture#8948
Open
vamshi567bh wants to merge 2 commits into
Open
test: add regression tests for custom shader with framebuffer depth texture#8948vamshi567bh wants to merge 2 commits into
vamshi567bh wants to merge 2 commits into
Conversation
…exture Adds two tests verifying that custom shaders can correctly sample both color and depth framebuffer textures via setUniform(), which is the pattern used by the Framebuffer Blur example. - custom shader sampling only color texture - custom shader sampling both color and depth textures Both tests confirm the library sets uModelViewMatrix = model x view correctly and that depth textures are readable via uniform sampler2D. Refs: processing#8940
a1277c0 to
c353761
Compare
19 tasks
Author
|
@davepagurek please review thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #8947.
changes
Adds two regression tests covering the custom shader + framebuffer depth texture pattern used by the Framebuffer Blur example (see #8940). No library code changes are needed — the library already handles this correctly
uModelViewMatrix/uProjectionMatrixcan samplefbo.colorviasetUniformand produce correct outputfbo.colorandfbo.depthsimultaneously, using depth values to modulate the output colorThe proposed matrix swap in PR #8947 was incorrect. All three multiply methods (
#mult4x4,#multNxN,#mult3x3) consistently perform right-multiplication. TheuModelViewMatrixis correctly computed asmodel × viewatp5.Renderer3D.js:1437. The Framebuffer Blur example vertex shader (uProjectionMatrix * uModelViewMatrix * position) is mathematically equivalent touProjectionMatrix * uViewMatrix * uModelMatrix * position.The
uSampleroverride bug that could affect custom shaders was already fixed by commitsf75f227and355a04b(Jun 2-3, 2026).PR Checklist
npm run lintpasses